<%-- 
    Document   : list_task
    Created on : Apr 28, 2013, 7:11:47 PM
    Author     : wan.fairul
--%>
<%@ include file="/WEB-INF/jsp/include/page_header.jspf" %>
<%@ taglib prefix="display" uri="http://displaytag.sf.net"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>.: Personal Task :.</title>        
        <script type="text/javascript">
            $(function() {
                $("#datepicker2").datepicker({
                    showOn: "button",
                    buttonImage: "${pageContext.request.contextPath}/images/icon/calendar.gif",
                    buttonImageOnly: true,
                    changeMonth: true,
                    dateFormat: 'dd/mm/yy',
                    changeYear: true
                });
            });
        </script>
    </head>
    <body>
        <s:messages/>
        <s:errors/>
        <s:useActionBean beanclass="exatrez.stripes.util.ListUtil" var="list"/>
        <s:form beanclass="exatrez.stripes.action.PersonalAction" name="form1">               
            <div>
                <fieldset>
                    <div>
                        <div id="page-title">
                            <span class="title">Searching</span>
                        </div>   
                        <p>
                            <label>Subject :</label>
                            <s:textarea name="task.subject"  rows="2" cols="50" class="clearAll"/>
                        </p>
                        <p>
                            <label>Date Send</label>
                            <s:text name="task.infoAudit.createDate" id="datepicker2" formatType="date" formatPattern="dd/MM/yyyy"
                                    onblur="editDateBlur(this, 'DD/MM/YYYY')"
                                    onkeypress="return editDatePre(this, 'DD/MM/YYYY', event)"
                                    onkeyup="return editDate(this, 'DD/MM/YYYY', event);" class="clearAll"/>  
                        </p>
                        <p>
                            <label>Priority:</label>
                            <s:select name="task.priorityCode.priorityCodeId" style="width:150px" class="clearAll">
                                <s:option value="">Please Choose</s:option>
                                <s:options-collection collection="${list.listPriorityCode}" label="priorityName" value="priorityCodeId"/>
                            </s:select>
                        </p>
                        <p>
                            <label>&nbsp;</label>
                            <s:submit name="searchListTaskClose" value="Search" class="btn"/>
                            <s:button name="clear" value="Clear" class="btn clear"/>
                        </p>

                    </div>
                    <div id="page-title">
                        <span class="title">List of Task</span>
                    </div>
                    <div>
                        <display:table class="tablecloth" name="${actionBean.listTaskHistory}" requestURI="/personalTask" id="line">
                            <display:column title="No." sortable="true">${line_rowNum}</display:column>
                            <display:column title="To" property="toUser" sortable="true"/>
                            <display:column title="Subject" sortable="true"><a href="personalTask?task_close&id=${line.personalTaskId}">${line.subject}</a></display:column>
                            <display:column title="Date Send" sortable="true"><fmt:formatDate value="${line.infoAudit.createDate}" pattern="dd/MM/yyyy"/> </display:column>
                            <display:column title="Priority" property="priorityCode.priorityName" sortable="true"/>
                            <display:column title="Priority Day" property="priorityDayCount" sortable="true"/>
                            <display:column title="Status/Responded" sortable="true">${line.statusRemarks}</display:column>
                        </display:table>
                    </div>         
                </fieldset>
            </div>


        </s:form>
    </body>
</html>
